Skip to content

Dockerfile: install picolibc & ARM/RISC-V GCC via package manager#116

Merged
bors[bot] merged 3 commits intoRIOT-OS:masterfrom
benpicco:picolibc-deb
Dec 15, 2022
Merged

Dockerfile: install picolibc & ARM/RISC-V GCC via package manager#116
bors[bot] merged 3 commits intoRIOT-OS:masterfrom
benpicco:picolibc-deb

Conversation

@benpicco
Copy link
Contributor

@benpicco benpicco commented Sep 30, 2020

There seems to be a problem with the picolibc install in riotdocker. (#109 (comment))
Instead of trying to sort that out by ourself, just use the package provided by Debian. It has no dependencies the respective gcc packages as dependencies.

So instead of manually downloading the toolchain, also install that from the repository.

@kaspar030
Copy link
Contributor

didn't upstream miss risc-v support?

@benpicco
Copy link
Contributor Author

benpicco commented Oct 2, 2020

I've been compile-testing for the hifive1 with it the whole time.

https://packages.debian.org/testing/picolibc-riscv64-unknown-elf

@kaspar030
Copy link
Contributor

somehow this failed all builds on travis.

@benpicco
Copy link
Contributor Author

benpicco commented Oct 2, 2020

Yes because I was wrong about the packages having no dependencies.
They depend on the respective gcc package (e.g. https://packages.debian.org/bullseye/gcc-riscv64-unknown-elf) which we also compile from source.

We can't just apt install those as they are not available in bionic (and the Debian packages have a lot of dependencies…)
#104 will fix this.

@kaspar030
Copy link
Contributor

@benpicco should we push this? how can I help?

@benpicco
Copy link
Contributor Author

benpicco commented Nov 3, 2021

Ah the problem is still that we install the compilers from outside the package manager, so the dependency of the picolibc package is not met.

For ARM, the 2019q4 version of GCC 9 we install manually is also available on focal, but for RISC-V our GCC 10.1.0-1.1 is a bit newer than what focal has in store.

@benpicco benpicco force-pushed the picolibc-deb branch 3 times, most recently from 4e3f09f to ea3663c Compare November 3, 2021 12:56
@benpicco
Copy link
Contributor Author

benpicco commented Nov 6, 2021

Looks like it worked this time!

@benpicco
Copy link
Contributor Author

benpicco commented Nov 9, 2021

bors try

bors bot added a commit that referenced this pull request Nov 9, 2021
@kaspar030
Copy link
Contributor

ok, but we're switching to the ubuntu gcc packages completely. do we want that?

@bors
Copy link
Contributor

bors bot commented Nov 9, 2021

try

Build succeeded:

@benpicco benpicco changed the title Dockerfile: install picolibc from Debian package Dockerfile: install picolibc & ARM/RISC-V GCC from Debian package Nov 15, 2021
@benpicco benpicco changed the title Dockerfile: install picolibc & ARM/RISC-V GCC from Debian package Dockerfile: install picolibc & ARM/RISC-V GCC via package manager Nov 15, 2021
@benpicco benpicco requested review from fjmolinas and maribu March 26, 2022 10:20
bors bot added a commit that referenced this pull request Mar 26, 2022
@bors
Copy link
Contributor

bors bot commented Mar 26, 2022

try

Build succeeded:

@kaspar030
Copy link
Contributor

I don't really like that this switches to ubuntu's version of arm gcc :/

@benpicco
Copy link
Contributor Author

What's wrong with it?

@kaspar030
Copy link
Contributor

What's wrong with it?

how has it been compiled? we've been using the arm toolchain for years. and the ubuntu one used to have quirks (I remember the small enum thing? or was that debian?).

@benpicco
Copy link
Contributor Author

benpicco commented Apr 8, 2022

I don't know, I've always just used the toolchain provided in the Ubuntu repository. (And we enable small enums ourselves in the build system)

@benpicco benpicco force-pushed the picolibc-deb branch 2 times, most recently from e22ba4d to 2d2894e Compare September 27, 2022 10:57
@benpicco benpicco requested a review from chrysn September 27, 2022 12:01
@benpicco
Copy link
Contributor Author

benpicco commented Sep 27, 2022

I would expect that most users are installing the toolchain from their distribution's repository as it's customary on Linux.

I didn't have any issues with using it for the past years.

Mind you that the source we are pulling from is deprecated and if we want to upgrade to a new version we'll have to adapt the build script.

I'm not keen on doing this tedious work when we could as well just install it from the repo instead.

@maribu
Copy link
Member

maribu commented Sep 27, 2022

If there are indeed issues with the Ubuntu toolchain, it would be IMO in our best interest to address them by getting fixes upstream into the Ubuntu repos. Ubuntu is very much the most popular Linux distro and Ubuntu user will use the toolchain that is packaged for Ubuntu. We have to deal with this in any case.

For me, it would also be easier to be able to reproduce the issues Ubuntu users have by just passing BUILD_IN_DOCKER=1 instead of having to set up a container / VM with Ubuntu. And ideally I would like to run into the issues myself during the CI run, rather than having someone else run into it.

@kaspar030
Copy link
Contributor

ok, let's do it

@kaspar030
Copy link
Contributor

@maribu your call when to merge this (to not change riotdocker during release)

@kaspar030
Copy link
Contributor

bors merge

1 similar comment
@maribu
Copy link
Member

maribu commented Dec 15, 2022

bors merge

@bors
Copy link
Contributor

bors bot commented Dec 15, 2022

Already running a review

@kaspar030
Copy link
Contributor

bors ping

@bors
Copy link
Contributor

bors bot commented Dec 15, 2022

pong

@bors
Copy link
Contributor

bors bot commented Dec 15, 2022

Build succeeded:

@bors bors bot merged commit 20529a8 into RIOT-OS:master Dec 15, 2022
@benpicco benpicco deleted the picolibc-deb branch December 15, 2022 16:31
@benpicco
Copy link
Contributor Author

Thank you!

kaspar030 added a commit to kaspar030/riotdocker that referenced this pull request Dec 19, 2022
This reverts commit 20529a8, reversing
changes made to 604bc23.
@kaspar030 kaspar030 mentioned this pull request Dec 19, 2022
bors bot added a commit that referenced this pull request Dec 19, 2022
220: Revert "Merge #116" r=aabadie a=kaspar030

It pains me a lot but the bad debian newlib package won't be fixed in time for the hard freeze, and neither will we sort out the issues with picolibc as default, in the week before x-mas. :(

This reverts commit 20529a8 (#116), reversing changes made to 604bc23.

Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants